package jannex.sql;

import jannex.JannexException;

import java.io.InputStream;
import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;

public interface JxClob extends java.sql.Clob, AutoCloseable {

    @Override
    long length() throws JannexException;

    @Override
    String getSubString(long pos, int length) throws JannexException;

    @Override
    Reader getCharacterStream() throws JannexException;

    @Override
    InputStream getAsciiStream() throws JannexException;

    @Override
    long position(String searchstr, long start) throws JannexException;

    @Override
    long position(java.sql.Clob searchstr, long start) throws JannexException;

    @Override
    int setString(long pos, String str) throws JannexException;

    @Override
    int setString(long pos, String str, int offset, int len) throws JannexException;

    @Override
    OutputStream setAsciiStream(long pos) throws JannexException;

    @Override
    Writer setCharacterStream(long pos) throws JannexException;

    @Override
    void truncate(long len) throws JannexException;

    @Override
    void free() throws JannexException;

    @Override
    Reader getCharacterStream(long pos, long length) throws JannexException;

    @Override
    default void close() {
        free();
    }
}